<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/vue.min.js"></script>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div id="app">
        <my-parent-comp></my-parent-comp>
    </div>
</body>
</html>
<script>

        var vm = new Vue({
            el: "#app",
            components:{
                "my-parent-comp":{//声明父组件
                    template:"<h1><span>我的父组件</span><my-child-comp></my-child-comp></h1>",
                    components:{//声明子组件
                        "my-child-comp":{template:"<p>子组件</p>"}
                    }
                }
            }
            

        })    
    </script>